//
//  LogonViewController.h
//  Rongcloud
//
//  Created by LiuLinhong on 2017/08/09.
//  Copyright © 2017年 Beijing Rongcloud Network Technology Co. , Ltd. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <RongRTCLib/RongRTCEngine.h>
#import "SettingPanelBuilder.h"
#import "LogonViewBuilder.h"
#import "LogonOptionTableViewDelegateSource.h"
#import "LogonRongRTCEngineDelegateImpl.h"

@interface LogonViewController : NSViewController <RongRTCEngineDelegate, NSTextFieldDelegate>

@property (strong) IBOutlet NSView *logonMainView;
@property (nonatomic, strong) LogonViewBuilder *logonViewBuilder;
@property (nonatomic, strong) SettingPanelBuilder *settingPanelBuilder;
@property (nonatomic, strong) LogonOptionTableViewDelegateSource *logonOptionTableViewDelegateSource;
@property (nonatomic, strong) RongRTCEngine *rongRTCEngine;
@property (nonatomic, strong) LogonRongRTCEngineDelegateImpl *logonRongRTCEngineDelegateImpl;
@property (nonatomic, assign) BOOL isLogonContentViewExpanded, isAudioOnly, isGPUFilter, isSRTPEncrypt, isConnectionQuic;
@property (nonatomic, assign) NSInteger resolutionRatioIndex, frameRateIndex, codeRateMaxIndex, codeRateMinIndex, connectionStyleIndex, codingStyleIndex, observerIndex, closeCameraIndex;

- (void)queryKeyTokenInRelease;
- (void)joinRoomButtonPressed;
- (void)expandButtonPressed;
- (void)identitySwitchAction:(id)sender;
- (void)logonOptionSwitchAction:(id)sender;
- (void)resolutionRadioButtonAction:(id)sender;
- (void)updateJoinRoomButtonSocket:(RongRTCConnectionState)state;
- (void)roomNumberTextFieldDidChange:(NSTextField *)textField;

+ (NSString *)getKeyToken;
+ (void)setConnectionState:(RongRTCConnectionState)state;
+ (NSUserDefaults *)shareSettingUserDefaults;

@end
